<div id='messages'>
  <ul id='messages-list'>
    <% @current_messages.each_with_index do |message, index| %>
      <li class='messages-list-item'>
        <div class='messages-list-item-name'>
          <%= "uid:" + index.to_s %>:

          <div class='messages-list-item-timestamp'>
            (<%= l message.created_at, format: :short %>)
          </div>
        </div>
        <div class='messages-list-item-body'>
          <%= message.body %>

        </div>
      </li>
    <% end %>
  </ul>
</div>

<div id='message-form-wrapper'>
  <%= form_for :message, url: a_messages_path, html: { id: 'message-form' } do |f| %>
    <%= f.text_area :body, id: 'message-form-body' %>
    <%= f.submit id: 'message-form-submit' %>
  <% end %>
</div>
